export default [
    {
        path: '/',
        name: 'home',
        meta: {
            title: '展示基础页',
        },
        component: () => import('../pages/home'),
        redirect: 'index',
        children: [
            {
                path: '/index',
                name: 'index',
                meta: {
                    title: '首页',
                },
                component: () => import('../pages/index'),
            },
            {
                path: '/product/:id',
                name: 'product',
                meta: {
                    title: '产品页',
                },
                component: () => import('../pages/product'),
            },
            {
                path: '/detail/:id',
                name: 'detail',
                meta: {
                    title: '详情页',
                },
                component: () => import('../pages/detail'),
            }
        ]
    },
    {
        path: '/order',
        name: 'order',
        meta: {
            title: '订单基础页',
            auth: 'login'
        },
        component: () => import('../pages/order'),
        redirect: 'orderlist',
        children: [
            {
                path: '/orderlist',
                name: 'orderlist',
                meta: {
                    title: '订单列表',
                },
                component: () => import('../pages/orderList'),
            },
            {
                path: '/orderconfirm',
                name: 'orderconfirm',
                meta: {
                    title: '确认订单',
                },
                component: () => import('../pages/orderConfirm'),
            },
            {
                path: '/orderpay',
                name: 'orderpay',
                meta: {
                    title: '支付订单',
                },
                component: () => import('../pages/orderPay'),
            }
        ]
    },
    {
        path: '/login',
        name: 'login',
        meta: {
            title: '用户登录',
        },
        component: () => import('../pages/login'),
    },
    {
        path: '/cart',
        name: 'cart',
        meta: {
            title: '购物车',
            auth: 'login'
        },
        component: () => import('../pages/cart'),
    },
    {
        path: '/movies',
        name: 'movies',
        meta: {
            title: '电影院'
        },
        component: () => import('../pages/movies'),
    },
    {
        path: '/player/:id',
        name: 'player',
        meta: {
            title: '播放'
        },
        component: () => import('../pages/player'),
    }
]

